package com.xyzh05.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

import org.compass.annotations.Searchable;
import org.compass.annotations.SearchableId;


@Entity
@Table(name="vipservice_transactionentity")
@Searchable
@XmlRootElement
public class VipServiceTransaction extends BaseObject implements Serializable {

	private static final long serialVersionUID = -132413123123211L;
	private Long id ; 
	private User user; 
	private TransactionEntry transactionEntry; 
	private VipService vipService ;
	
	@Id @GeneratedValue(strategy=GenerationType.AUTO) @SearchableId    
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@ManyToOne(fetch=FetchType.EAGER, cascade = {CascadeType.ALL} )
	@JoinColumn(name="create_user_id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne(fetch=FetchType.EAGER, cascade = {CascadeType.ALL} )
	@JoinColumn(name="transaction_entry_id")
	public TransactionEntry getTransactionEntry() {
		return transactionEntry;
	}
	public void setTransactionEntry(TransactionEntry transactionEntry) {
		this.transactionEntry = transactionEntry;
	}
	@ManyToOne(fetch=FetchType.EAGER, cascade = {CascadeType.ALL} )
	@JoinColumn(name="vip_service_id")
	public VipService getvipService() {
		return vipService;
	}
	public void setvipService(VipService vipService) {
		this.vipService = vipService;
	}
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	} 
}
